#include <iostream>
using namespace std;
int main ()
{
    int d;
    cout<<"vvedite den"<<endl;
    cin>>d;
    if (d%7==0)
        cout<<"1";
    else if (d%6==0)
        cout<<"7";
    else if (d%5==0)
        cout<<"6";
    else if (d%4==0)
        cout<<"5";
    else if (d%3==0)
        cout<<"4";
    else if (d%2==0)
        cout<<"3";
    else
        cout<<"2";
    return 0;
}
